
DEFAULTS = {
    'mode'      : 'published',
    'action'    : 'view',
    'method'    : '',
}

METASEARCH_PARAMS = {
    'keywords-length'   : 128,
    'search-count-min'  : 5,
    'search-count-max'  : 50,
    'search-count'      : 10,
}

QUERY_DEFAULTS = {
    'user-query-limit' : 1000,
    'guest-query-limit': 500,
}

SERVICE_SPARQL_DEFAULTS = {
    'query-length'  : 1000,
    'graph-uri-count' : 25,
    'graph-result-method-length' : 10, 
}

SERVICE_VERSA_DEFAULTS = {
    'query-length'  : 500,
}

SERVICE_SPARQL_GRAPH_METHOD_DEFAULTS = {
    'srx' : 'rdf',
    'srj' : 'jrdf',
    'mml' : 'rdf',
    'html' : 'n3',
    'xhtml' : 'n3',
}

SERVICE_SPARQL_VALID_GRAPH_METHODS = set([
    'rdf',
    'json',
    'jrdf',
    'nt',
    'n3',
])

XML_METHODS = set([
    'xml',
    'mml',
    'rdf'
])

DEFAULT_PRETTY_METHODS = set([
    'html',
    'xhtml'
])

from myelin.Ns import MYELIN, DC, DCTERMS, DCMITYPE, FOAF, WOT, XML_SCHEMA, HTTP
from myelin.rdf.Ns import RDF, RDFS, OWL, SW_VOCAB_STATUS

DEFAULT_NSMAP = {
    u'urn:uuid:': 'uuid',
    u'urn:hash:': 'hash',
    RDF         : 'rdf',
    RDFS        : 'rdfs',
    OWL         : 'owl',
    MYELIN      : 'm',
    HTTP        : 'http',
    DC          : 'dc',
    DCTERMS     : 'dcterms',
    DCMITYPE    : 'dcmitype',
    FOAF        : 'foaf',
    WOT         : 'wot',
    SW_VOCAB_STATUS : 'swvocab',
    XML_SCHEMA       : 'xschema',
}

DEFAULT_SPARQL_NSMAP = dict((p,n) for n,p in DEFAULT_NSMAP.iteritems())

DEFAULT_VERSA_NSMAP = DEFAULT_SPARQL_NSMAP.copy()
DEFAULT_VERSA_NSMAP.update({
    'vtrav' : 'http://rdfinference.org/versa/0/2/traverse/',
    'vsort' : 'http://rdfinference.org/versa/0/2/sort/'
})

DEFAULT_RDF_GRAPH_METHOD='rdf'

from myelin import config

METHODS_TO_IMT = config.METHODS_TO_IMT # has all the methods we need

del MYELIN, DC, DCTERMS, DCMITYPE, FOAF, WOT, XML_SCHEMA, \
    RDF, RDFS, OWL, SW_VOCAB_STATUS, \
    config